package com.inspur.cloud.entity.dataspace.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;
import java.util.List;

@Data
@ApiModel(value = "hive对象")
public class HiveVO {

    @ApiModelProperty(value = "本资源ID，编辑或删除、分配的时候需要")
    private Integer resourceId;
    @ApiModelProperty(value = "父资源ID，创建的时候需要，查询的时候也会返回")
    private Integer parentId;
    @ApiModelProperty(value = "查询/创建哪一类资源分类，1数据库2表名3列名", example = "1")
    private Integer cate = 1;
    /**
     * 数据库名称
     */
    @ApiModelProperty(value = "数据库名称")
    private String databaseName;
    /**
     * 表名称
     */
    @ApiModelProperty(value = "表名称")
    private String tableName;
    /**
     * 列名称
     */
    @ApiModelProperty(value = "列名称")
    private String columnName;
    @ApiModelProperty(value = "表下面的列数")
    private Integer columnNum;
    @ApiModelProperty(value = "租户列表，返回时使用")
    private List<String> tenantList;
    @ApiModelProperty(value = "用户列表，返回时使用")
    private List<String> userList;
    @ApiModelProperty(value = "租户ID列表,传递参数时使用此数据接口，不要直接传用户名")
    private List<Integer> tenantIdList;
    @ApiModelProperty(value = "用户ID列表,传递参数时使用此数据接口，不要直接传用户名")
    private List<Integer> userIdList;
    @ApiModelProperty(value = "资源拥有者id")
    private Integer owner;
    @ApiModelProperty(value = "资源类型,1公共2私有3共享", required = true)
    private Integer type;
    @ApiModelProperty(value = "权限字段，以|隔开，比如 read|write，需要是小写")
    private String powerList;
    @ApiModelProperty(value = "层级数")
    private Integer level;

    @ApiModelProperty(value = "修改时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updDate;
    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date insDate;
    @ApiModelProperty(value = "创建者")
    private String creator;
}
